home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-05-02 | 6.2 KB | 252 lines | [TEXT/MPS ] |
- /*
- File: TokenTalkSampleScript.r
-
- Contains: Script to create a TokenTalk Installer
-
- Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #include "InstallerTypes.r"
- #include "Types.r"
-
- #define SystemFile 1
- #define System6Installation 2
- #define System7Installation 3
- #define EasyInstall6 4
- #define EasyInstall7 5
- #define NoSystem 6
- #define HasSystem 7
- #define aSystem6 8
- #define aSystem7 9
- #define HasEasyInstall 10
- #define NeedAtalk 11
- #define HasSomething 12
- #define HasNothing 13
- #define HasAnyCard 14
- #define CmtTokenTalk 15
-
- #define AtlkFolder "TokenTalk Installer:AppleTalk Files"
- #define ATCustomShowFlag showsOnCustom
- #define TTCustomShowFlag showsOnCustom
-
- resource 'vers' (1, purgeable)
- {
- 1, 0, release, 0,
- verUS,
- "1.0",
- "1.0, © Apple Computer, Inc. 1990-1991"
- };
-
- resource 'vers' (2, purgeable)
- {
- 1,0, release, 0,
- verUS,
- "1.0",
- "TokenTalk Installer"
- };
-
- resource 'infs' (SystemFile)
- {
- 'zsys', /* File Type */
- 'MACS', /* File Creator */
- 0x00, /* Creation Date */
- noSearchForFile,
- TypeCrNeedNotMatch,
- "special-macs:System" /* path name */
- };
-
- #include "AppleTalkInstall.r"
- #include "TokenTalkInstall.r"
-
- /* -----------------------------------------------------------------
- Assert aSystem6 if we are on System 6 or better
- ----------------------------------------------------------------- */
-
- resource 'inrl' (System6Installation)
- {
- format0
- {{
- checkFileVersion {SystemFile, 6, 4, release, 0},
- addAssertion {{aSystem6}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Assert aSystem7 if we are on System 7 or better
- ----------------------------------------------------------------- */
-
- resource 'inrl' (System7Installation)
- {
- format0
- {{
- checkFileVersion {SystemFile, 7, 0, release, 0},
- addAssertion {{aSystem7}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Assert HasSomething if a TokenTalk card is present
- ----------------------------------------------------------------- */
-
- resource 'inrl' (HasAnyCard)
- {
- format0
- {{
- /* Here, we would probably invoke an 'infn' to determine if
- ** the right kind of card is present
- */
- AddAssertion {{HasSomething}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Add EasyInstall of TokenTalk if System 6 and HasSomething is
- asserted
- ----------------------------------------------------------------- */
-
- resource 'inrl' (EasyInstall6)
- {
- format0
- {{
- checkAllAssertions {{aSystem6,HasSomething}},
- AddUserDescription {"Click Install to place\n"},
- AddAssertion {{HasEasyInstall}},
- AddUserDescription {"• TokenTalk\n"},
- addPackages {{NPakTokenTalk}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Add EasyInstall of TokenTalk if System 7 and HasSomething is
- asserted
- ----------------------------------------------------------------- */
-
- resource 'inrl' (EasyInstall7)
- {
- format0
- {{
- checkAllAssertions {{aSystem7,HasSomething}},
- AddAssertion {{HasEasyInstall}},
- AddUserDescription {"Click Install to place\n"},
- AddUserDescription {"• TokenTalk\n"},
- addPackages {{NPakTokenTalk}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Add the AppleTalk package if HasEasyInstall is asserted AND
- we are installing on System 6
- ----------------------------------------------------------------- */
-
- resource 'inrl' (NeedATalk)
- {
- format0
- {{
- /* Don't install AppleTalk version 56 for System 7
- */
- checkAllAssertions {{HasEasyInstall,aSystem6}},
- AddUserDescription {"• AppleTalk version 56.0\n"},
- addPackages {{NPak6ATalk}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Check if System 6 or System 7 was present
- ----------------------------------------------------------------- */
-
-
- resource 'inrl' (HasSystem)
- {
- format0
- {{
- checkAnyAssertion {{aSystem6, aSystem7}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Report no System file to the user - This is a problem.
- ----------------------------------------------------------------- */
-
- resource 'inrl' (NoSystem)
- {
- format0
- {{
- checkAllAssertions {{HasSomething}},
- reportVolError {
- "The selected disk named '^0' has no installed System. TokenTalk cannot be"
- " installed on this disk. Please click Switch Disk to choose a different disk or"
- " insert a floppy disk."}
- }};
- };
-
- /* -----------------------------------------------------------------
- Check if any TokenTalk cards were found
- ----------------------------------------------------------------- */
-
- resource 'inrl' (hasSomething)
- {
- format0
- {{
- checkAllAssertions {{HasSomething}}
- }};
- };
-
- /* -----------------------------------------------------------------
- Report no Ethernet cards found in the system
- ----------------------------------------------------------------- */
-
- resource 'inrl' (hasNothing)
- {
- format0
- {{
- reportSysError {"Your Macintosh has no Token ring cards installed.\n"}
- }};
- };
-
- /* -----------------------------------------------------------------
- The comment for the EtherTalk custom install
- ----------------------------------------------------------------- */
-
- resource 'icmt' (CmtTokenTalk)
- {
- ATReleaseDate, /* Release Date */
- 100, /* Version 1.0 */
- IconTTalk, /* Icon ID defined in TokenTalkInstall.r */
- "This installs TokenTalk and the Token ring driver for the <your "
- "card name here>. If you are doing a custom install on System 6, be "
- "sure to install AppleTalk version 56 as well."
- };
-
- /* -----------------------------------------------------------------
- The Framework Rule
- ----------------------------------------------------------------- */
-
- resource 'infr' (0)
- {
- format0
- {{
- /* Determine the System type */
- pickFirst, {System7Installation, System6Installation},
-
- /* Determine if any cards are present */
- pickAll, {HasAnyCard},
-
- /* Check if any Easy Installs can be done */
- pickFirst, {EasyInstall6, EasyInstall7},
-
- /* Add AppleTalk if we had an Easy Install */
- pickAll, {NeedATalk},
-
- /* If no cards in System - report to user */
- pickFirst, {
- HasSomething,
- HasNothing
- },
- /* If we had cards, but no system file - report to user */
- pickFirst, {
- HasSystem,
- NoSystem
- }
- }};
- };